<%@ page import="java.util.List" %>
<%@ page import="cn.NewsDao.NewsDao1" %>
<%@ page import="cn.NewsDaoImpl.NewsDaoImpl1" %>
<%@ page import="cn.entity.News1" %>
<%@ page import="cn.entity.Detail" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/4/8
  Time: 10:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        NewsDao1 newsDao1 = new NewsDaoImpl1();
        Detail detail = new Detail();
        detail.setIndex(0);
           int index1=0;
           String index= request.getParameter("index");
           if(index == null){
               detail.setIndex(0);

           }else {
               index1=Integer.parseInt(index);
               detail.setIndex(index1);
       }

        detail.setCount(0);
        String crenCount=   request.getParameter("crenCount");
        if(index == null){
            detail.setCount(1);
        }else {
            detail.setCount(1);
        }




      List<News1>  list =newsDao1.selectPage1(detail);
      session.setAttribute("list",list);
      session.setAttribute("index1",index1);
      request.getRequestDispatcher("index.jsp").forward(request,response);
    %>

</body>
</html>
